<?php

declare(strict_types=1);

namespace App\CustHub\Constants;

use App\Common\Constants\AbstractBaseConstants;
use App\CustHub\Service\ChCorpTagService;
use Hyperf\Constants\Annotation\Constants;

#[Constants]
class SyncTaskTypeConstants extends AbstractBaseConstants
{
    /**
     * @Message("企业标签")
     */
    public const CORP_TAG = 1;

    /**
     * @Message("个人标签")
     */
    public const PERSONAL_TAG = 2;


    /**
     * @Message("联系人")
     */
    public const CONTACTS = 3;

    /**
     * @Message("群")
     */
    public const ROOM = 4;

    /**
     * @Message("企业成员")
     */
    public const EMPLOYEE = 5;


    public static function getNeedCurrentSeqType(): array
    {
        return [
            self::CORP_TAG,
            self::PERSONAL_TAG
        ];
    }

    public static function classMap(): array
    {
        return [
            self::CORP_TAG => ChCorpTagService::class,
            self::PERSONAL_TAG => ChCorpTagService::class,
        ];
    }

    public static function getClass(int $type)
    {
        return self::classMap()[$type] ?? '';
    }

    public static function methodMap(): array
    {
        return [
            self::CORP_TAG => 'syncTag',
            self::PERSONAL_TAG => 'syncTag',
        ];
    }

    public static function getMethod(int $type)
    {
        return self::classMap()[$type] ?? '';
    }
}